package com.pachong.android.frameworkbase.imageloader.uil;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.pachong.android.frameworkbase.R;

/**
 * 获取不同默认图片工厂
 * 
 */
public class UILImageOptionFactory {

	public final static int OPTION_DEF = 1;
//	public final static int OPTION_DEF = 3;

	public static DisplayImageOptions createImageOption(int type) {

		switch (type) {
			case OPTION_DEF:
				return new DisplayImageOptions.Builder().cacheInMemory(true)
						.cacheOnDisk(true).considerExifParams(true)
						.bitmapConfig(Bitmap.Config.RGB_565)
						.cacheInMemory(true)
						.cacheOnDisk(true)
						.showImageForEmptyUri(R.drawable.ic_launcher)
						.showImageOnLoading(R.drawable.ic_launcher).build();

//			.displayer(
//					new RoundedBitmapDisplayer(DimensionUtility.dip2px(
//							BSApplication.mContext, 10))).build();
			default:
				return new DisplayImageOptions.Builder().cacheInMemory(true)
						.cacheOnDisk(true).considerExifParams(true)
						.bitmapConfig(Bitmap.Config.RGB_565)
						.showImageOnLoading(R.drawable.ic_launcher).build();

		}
	}

}
